package com.huilian.iotbox.admin.controller;

import com.huilian.iotbox.admin.service.BaudService;
import com.huilian.iotbox.admin.service.UserService;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.controller.BaseController;
import com.huilian.iotbox.data.vo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author chenqiwen
 * @CreateDate: 2021-04-30-16-49
 * @Description:
 */
@RestController
@RequestMapping("/api/baud")
public class BaudController extends BaseController {
    @Autowired
    private BaudService baudService;
    @Autowired
    private UserService userService;

    @GetMapping("/findAllBaud")
    public ServerResponse findAllBaud(HttpServletRequest request){
        UserInfo userInfo = userService.getLoginUserInfo(request);
        return baudService.findAllBaud();
    }
}
